]> snippets.scripts.mit.edu Git - Scripts/git/.git/blame - sipbmp3-itunes/Send to sipbmp3.applescript
git-rcsimport: More portability fixes.
[Scripts/git/.git] / sipbmp3-itunes / Send to sipbmp3.applescript
CommitLineData
f70587a5
KM
1-- -----------------
2-- iTunes -> sipbmp3
3-- -----------------
4-- This is a simple little script which sends
5-- music from an iTunes library to the sipbmp3
6-- lpr server.
7--
8-- Changelog:
9--
10-- 9 Jan 2009 -> price added 'quoted form'
11-- 7 Jan 2009 -> kmill created initial version
12--
13-- Installation:
14--
15-- 1) Launch the Printer Setup Utility and add
16-- an IP Printer with the LPD protocol with
17-- the following information:
18-- Address: zygorthian-space-raiders.mit.edu
19-- Queue: sipbmp3
20-- It is not necessary to specify the driver.
21--
22-- 2) Create the directory ~/Library/iTunes/Scripts
23-- and place the "Send to sipbmp3.scpt" file
24-- within.
25--
26-- Usage:
27--
28-- When in iTunes, select the songs which you
29-- would like to hear in the office, and click
30-- "Send to sipbmp3" in the script menu from
31-- the menu bar. The script menu looks like a
32-- little scroll icon. There will be no
33-- feedback beyond the pleasant sounds you now
34-- hear around you.
35
36set lista to {}
37
38tell application "iTunes"
39 repeat with t in selection
40 if class of t is (file track) then
41 set loc to POSIX path of (get location of t)
42 set end of lista to "lpr -o raw -Psipbmp3 " & (quoted form of loc)
43 end if
44 end repeat
45end tell
46
47repeat with com in lista
48 do shell script com
49end repeat